import axios from 'axios'
export default {
  /* FETCH_BLOGS (context, params = {}) {
    // context 其实就是 store这个仓库实例里面有commit方法
    axios.post('https://api.it120.cc/conner/cms/news/list/v2', params).then(res => {
      if (res.data.code === 0) {
        context.commit('INIT_BLOGS', res.data.data.result)
      }
    })
  } */
  FETCH_BLOGS ({ commit }, params = {}) {
    // context 其实就是 store这个仓库实例里面有commit方法
    axios.post('https://api.it120.cc/conner/cms/news/list/v2', params).then(res => {
      if (res.data.code === 0) {
        commit('INIT_BLOGS', res.data.data.result)
      }
    })
  }
}
